package routers

import (
	"LiquidMeasurement/controllers"
	"github.com/astaxie/beego"
)

func init() {
    beego.Router("/", &controllers.AdminController{})
//	beego.Router("/admin", &controllers.MainController{})
//	beego.Router("/user/login", &controllers.AdminController{},"*:UserLogin")
	beego.Router("/admin/login", &controllers.AdminController{},"*:Login")
	beego.Router("/admin/register/:UserID", &controllers.AdminController{},"*:RegisterAdmin")
	beego.Router("/admin/logout/:UserID", &controllers.AdminController{},"*:LoginOut")
	beego.Router("/admin/del_admin", &controllers.AdminController{},"*:DeleteAdmin")
	beego.Router("/admin/del_admins", &controllers.AdminController{},"*:DeleteAdmins")

	//	beego.Router("/admin/update", &controllers.AdminController{},"*:UpdateUser")
	beego.Router("/admin/all", &controllers.AdminController{},"*:GetAllUsers")
	beego.Router("/admin/index/:UserID", &controllers.AdminController{},"*:Index")
	beego.Router("/admin/show_admins_list/:UserID", &controllers.AdminController{},"*:ShowAdminsList")
	beego.Router("/admin/update_admin/:UserID", &controllers.AdminController{},"*:UpdateAdmin")
	beego.Router("/admin/show_admin_index/:UserID", &controllers.AdminController{},"*:ShowAdminIndex")



	beego.Router("/admin/getuser", &controllers.AdminController{},"*:GetUser")

	beego.Router("/user/inquire",&controllers.UserController{},"*:Inquire")
	beego.Router("/user/history",&controllers.UserController{},"*:History")
	beego.Router("/user/setup",&controllers.UserController{},"*:Setup")


	beego.Router("/bed/add", &controllers.BedController{},"*:CreateBed")
	beego.Router("/bed/delete", &controllers.BedController{},"*:DeleteBed")
	beego.Router("/bed/getbedinfo", &controllers.BedController{},"*:GetBedInfoById")

//	beego.Router("/bedsinfo/refresh", &controllers.BedController{},"*:ChangeBedInfo")
//	beego.Router("/bedsinfo/warning", &controllers.BedController{},"*:HandleWarning")

//	beego.Router("/hardware/udp_broadcast",&controllers.CommonController{},"get:Get;post:UdpBroadcast")
	beego.Router("/ws/join",&controllers.DeviceConnController{},"*:DeviceJoin")


	beego.Router("/admin/api/get_devices_list/:UserID", &controllers.BedDeviceController{},"*:GetDevicesInfo")
	beego.Router("/admin/api/show_devices_list", &controllers.BedDeviceController{},"*:ShowDevicesInfo")
	beego.Router("/admin/api/broadcast_ip", &controllers.AdminController{},"*:BoadcastIP")
	beego.Router("/admin/api/chaneg_filter/:UserID", &controllers.AdminController{},"*:ChangeFilter")
//	beego.Router("/admin/api/show_devices/:UserID", &controllers.AdminController{},"*:ChangeFilter")



//部门相关
	beego.Router("/department/add_department/:UserID", &controllers.DepartmentController{},"*:CreateDepartment")
	beego.Router("/department/del_department/:UserID", &controllers.DepartmentController{},"*:DeleteDepartment")
	beego.Router("/department/update_department/:UserID/:id", &controllers.DepartmentController{},"*:UpdateDepartment")
	beego.Router("/admin/show_departments_list/:UserID", &controllers.DepartmentController{},"*:ShowDepartmentList")

	//房间相关
	beego.Router("/room/add_room/:UserID", &controllers.RoomController{},"*:CreateRoom")
	beego.Router("/room/del_room/:UserID", &controllers.RoomController{},"*:DeleteRoom")
	beego.Router("/room/update_room/:UserID/:id", &controllers.RoomController{},"*:UpdateRoom")
	beego.Router("/admin/show_rooms_list/:UserID", &controllers.RoomController{},"*:ShowRoomsList")

	//床位相关
	beego.Router("/bed/add_bed/:UserID", &controllers.BedController{},"*:CreateBed")
	beego.Router("/bed/del_bed/:UserID", &controllers.BedController{},"*:DeleteBed")
	beego.Router("/bed/update_bed/:UserID/:id", &controllers.BedController{},"*:UpdateBed")
	beego.Router("/admin/show_beds_list/:UserID", &controllers.BedController{},"*:ShowBedsList")

}
